cmake_minimum_required(VERSION 3.4.1)

add_library(skia SHARED IMPORTED)
set_target_properties(skia PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/skia/lib/${ANDROID_ABI}/libskia.so)

include_directories(
        "${CMAKE_SOURCE_DIR}/jsc"

        "${CMAKE_SOURCE_DIR}/skia"
        "${CMAKE_SOURCE_DIR}/skia/include/android"
        "${CMAKE_SOURCE_DIR}/skia/include/c"
        "${CMAKE_SOURCE_DIR}/skia/include/codec"
        "${CMAKE_SOURCE_DIR}/skia/include/config"
        "${CMAKE_SOURCE_DIR}/skia/include/core"
        "${CMAKE_SOURCE_DIR}/skia/include/docs"
        "${CMAKE_SOURCE_DIR}/skia/include/effects"
        "${CMAKE_SOURCE_DIR}/skia/include/encode"
        "${CMAKE_SOURCE_DIR}/skia/include/gpu"
        "${CMAKE_SOURCE_DIR}/skia/include/pathops"
        "${CMAKE_SOURCE_DIR}/skia/include/ports"
        "${CMAKE_SOURCE_DIR}/skia/include/private"
        "${CMAKE_SOURCE_DIR}/skia/include/svg"
        "${CMAKE_SOURCE_DIR}/skia/include/third_party"
        "${CMAKE_SOURCE_DIR}/skia/include/utils"
)

add_library(native-lib SHARED native-lib.cpp)

find_library(log-lib log)

target_link_libraries(native-lib ${log-lib} -ljnigraphics skia)
